package com.example.mine_platform.mapper;


import com.example.mine_platform.pojo.entities.Production;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ProductionMapper extends Mapper<Production> {
    @Results(id = "productionResultMap", value = {
            @Result(property = "id", column = "id"),
            @Result(property = "name", column = "name"),
            @Result(property = "describe", column = "production_describe"),
            @Result(property = "startDate", column = "start_date"),
            @Result(property = "endDate", column = "end_date"),
            @Result(property = "output", column = "output"),
            @Result(property = "manager", column = "manager"),
            @Result(property = "actualOutput", column = "actual_output"),
            @Result(property = "actualDate", column = "actual_date"),
            @Result(property = "status", column = "status"),
            @Result(property = "createTime", column = "create_time"),
            @Result(property = "updateTime", column = "update_time"),
            @Result(property = "deleted", column = "deleted")
    })
    @Select("select * from production where deleted=0")
    public List<Production> getAllProduction();
}